import { XMLParser } from 'fast-xml-parser'
import fs from 'fs-extra'

export async function read(path) {
    if (await fs.pathExists(path)) {
        const xml = await fs.readFile(path, { encoding: 'utf-8' })
        const parser = new XMLParser()
        return parser.parse(xml)
    }
}
